<template>
  <!-- 引入公共布局，音乐故事内容放在插槽里 -->
  <Layout>
    <div class="music-story-container">
      <h2 class="page-title">音乐故事</h2>
      <p class="page-desc">在这里探索音乐背后的故事，发现灵感</p>

      <!-- 音乐故事列表（示例内容） -->
      <div class="story-list">
        <div class="story-card">
          <img src="https://picsum.photos/id/96/400/200" alt="故事封面" class="story-cover">
          <div class="story-content">
            <h3>《星空》的创作灵感</h3>
            <p>这首电子音乐源于制作人对宇宙的想象，每一段旋律都对应着不同的星象...</p>
            <button class="read-more-btn">阅读更多</button>
          </div>
        </div>
        <div class="story-card">
          <img src="https://picsum.photos/id/119/400/200" alt="故事封面" class="story-cover">
          <div class="story-content">
            <h3>古典与流行的碰撞</h3>
            <p>如何用AI将贝多芬的《月光奏鸣曲》改编成流行曲风？这里有详细的创作思路...</p>
            <button class="read-more-btn">阅读更多</button>
          </div>
        </div>
      </div>
    </div>
  </Layout>
</template>

<script setup>
import Layout from './Layout.vue'; // 引入公共布局
</script>

<style scoped>
.music-story-container {
  max-width: 1000px;
  margin: 0 auto;
}
.page-title {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  display: inline-block;
}
.page-desc {
  font-size: 1rem;
  color: var(--text-tertiary);
  margin-bottom: 2rem;
}

.story-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.story-card {
  display: flex;
  gap: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 1rem;
  transition: transform 0.3s ease;
}
.story-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}
.story-cover {
  width: 200px;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.story-content {
  flex: 1;
}
.story-content h3 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.story-content p {
  font-size: 0.95rem;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.read-more-btn {
  background: var(--primary-color);
  color: var(--text-primary);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.read-more-btn:hover {
  background: var(--primary-hover);
}

/* 响应式 */
@media (max-width: 768px) {
  .story-card {
    flex-direction: column;
  }
  .story-cover {
    width: 100%;
    height: auto;
  }
}
</style>